Optimal. Leaf size=74 \[ \frac {(e f-d g) (d g+e f) \tanh ^{-1}\left (\frac {e x}{d}\right )}{2 d^3 e^3}+\frac {(f+g x) \left (d^2 g+e^2 f x\right )}{2 d^2 e^2 \left (d^2-e^2 x^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {723, 208} \[ \frac {(f+g x) \left (d^2 g+e^2 f x\right )}{2 d^2 e^2 \left (d^2-e^2 x^2\right )}+\frac {(e f-d g) (d g+e f) \tanh ^{-1}\left (\frac {e x}{d}\right )}{2 d^3 e^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 208
Rule 723
Rubi steps
\begin {align*} \int \frac {(f+g x)^2}{\left (d^2-e^2 x^2\right )^2} \, dx &=\frac {\left (d^2 g+e^2 f x\right ) (f+g x)}{2 d^2 e^2 \left (d^2-e^2 x^2\right )}-\frac {1}{2} \left (-\frac {f^2}{d^2}+\frac {g^2}{e^2}\right ) \int \frac {1}{d^2-e^2 x^2} \, dx\\ &=\frac {\left (d^2 g+e^2 f x\right ) (f+g x)}{2 d^2 e^2 \left (d^2-e^2 x^2\right )}+\frac {(e f-d g) (e f+d g) \tanh ^{-1}\left (\frac {e x}{d}\right )}{2 d^3 e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 85, normalized size = 1.15 \[ \frac {-2 d^2 f g-d^2 g^2 x-e^2 f^2 x}{2 d^2 e^2 \left (e^2 x^2-d^2\right )}-\frac {\left (d^2 g^2-e^2 f^2\right ) \tanh ^{-1}\left (\frac {e x}{d}\right )}{2 d^3 e^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.88, size = 155, normalized size = 2.09 \[ -\frac {4 \, d^{3} e f g + 2 \, {\left (d e^{3} f^{2} + d^{3} e g^{2}\right )} x + {\left (d^{2} e^{2} f^{2} - d^{4} g^{2} - {\left (e^{4} f^{2} - d^{2} e^{2} g^{2}\right )} x^{2}\right )} \log \left (e x + d\right ) - {\left (d^{2} e^{2} f^{2} - d^{4} g^{2} - {\left (e^{4} f^{2} - d^{2} e^{2} g^{2}\right )} x^{2}\right )} \log \left (e x - d\right )}{4 \, {\left (d^{3} e^{5} x^{2} - d^{5} e^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 101, normalized size = 1.36 \[ \frac {{\left (d^{2} g^{2} - f^{2} e^{2}\right )} e^{\left (-3\right )} \log \left (\frac {{\left | 2 \, x e^{2} - 2 \, {\left | d \right |} e \right |}}{{\left | 2 \, x e^{2} + 2 \, {\left | d \right |} e \right |}}\right )}{4 \, d^{2} {\left | d \right |}} - \frac {{\left (d^{2} g^{2} x + 2 \, d^{2} f g + f^{2} x e^{2}\right )} e^{\left (-2\right )}}{2 \, {\left (x^{2} e^{2} - d^{2}\right )} d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 180, normalized size = 2.43 \[ -\frac {f g}{2 \left (e x -d \right ) d \,e^{2}}+\frac {f g}{2 \left (e x +d \right ) d \,e^{2}}+\frac {g^{2} \ln \left (e x -d \right )}{4 d \,e^{3}}-\frac {g^{2} \ln \left (e x +d \right )}{4 d \,e^{3}}-\frac {f^{2}}{4 \left (e x -d \right ) d^{2} e}-\frac {f^{2}}{4 \left (e x +d \right ) d^{2} e}-\frac {f^{2} \ln \left (e x -d \right )}{4 d^{3} e}+\frac {f^{2} \ln \left (e x +d \right )}{4 d^{3} e}-\frac {g^{2}}{4 \left (e x -d \right ) e^{3}}-\frac {g^{2}}{4 \left (e x +d \right ) e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 111, normalized size = 1.50 \[ -\frac {2 \, d^{2} f g + {\left (e^{2} f^{2} + d^{2} g^{2}\right )} x}{2 \, {\left (d^{2} e^{4} x^{2} - d^{4} e^{2}\right )}} + \frac {{\left (e^{2} f^{2} - d^{2} g^{2}\right )} \log \left (e x + d\right )}{4 \, d^{3} e^{3}} - \frac {{\left (e^{2} f^{2} - d^{2} g^{2}\right )} \log \left (e x - d\right )}{4 \, d^{3} e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.61, size = 115, normalized size = 1.55 \[ \frac {\frac {f\,g}{e^2}+\frac {x\,\left (d^2\,g^2+e^2\,f^2\right )}{2\,d^2\,e^2}}{d^2-e^2\,x^2}-\frac {2\,\mathrm {atanh}\left (\frac {4\,e\,x\,\left (\frac {d^2\,g^2}{4}-\frac {e^2\,f^2}{4}\right )}{d\,\left (d^2\,g^2-e^2\,f^2\right )}\right )\,\left (\frac {d^2\,g^2}{4}-\frac {e^2\,f^2}{4}\right )}{d^3\,e^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.71, size = 156, normalized size = 2.11 \[ \frac {- 2 d^{2} f g + x \left (- d^{2} g^{2} - e^{2} f^{2}\right )}{- 2 d^{4} e^{2} + 2 d^{2} e^{4} x^{2}} + \frac {\left (d g - e f\right ) \left (d g + e f\right ) \log {\left (- \frac {d \left (d g - e f\right ) \left (d g + e f\right )}{e \left (d^{2} g^{2} - e^{2} f^{2}\right )} + x \right )}}{4 d^{3} e^{3}} - \frac {\left (d g - e f\right ) \left (d g + e f\right ) \log {\left (\frac {d \left (d g - e f\right ) \left (d g + e f\right )}{e \left (d^{2} g^{2} - e^{2} f^{2}\right )} + x \right )}}{4 d^{3} e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________